package com.mew.chess.core.game.shbz.game.message.request;

import com.zebra.common.ZebraBaseMessage;
import io.netty.buffer.ByteBuf;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;


@Data
@ToString
@NoArgsConstructor
public class SwitchBetRequestMessage extends ZebraBaseMessage<SwitchBetRequestMessage> {

    private int seatNo;  //推送 其他玩家需要
    private byte betType;

    @Override
    public void write(ByteBuf b) {

        writeInt(b, this.seatNo);
        writeByte(b, this.betType);
    }

    @Override
    public SwitchBetRequestMessage read(ByteBuf b) {
        SwitchBetRequestMessage message = new SwitchBetRequestMessage();
        message.seatNo = readInt(b);
        message.betType = readByte(b);
        return message;
    }

}
